<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>SwiftAdmin 用户注册</title>
    <include file="public:header"/>
</head>
<body>
<style>

    .layui-form-item {
        margin-bottom: 15px;
    }

    .red {
        color: red;
    }

    .layui-input:hover {
        border: 1px solid #1890ff !important;
    }
</style>
<div id="register" class="layui-fluid">
    <form class="layui-form layui-form-fixed" action="/user/register" method="post">

        <div class="layui-form-item">
            <label class="layui-form-label"><span class="red">*</span> 用户帐号</label>
            <div class="layui-input-block">
                <input type="text" name="nickname" placeholder="请输入帐号" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="red">*</span> 密码</label>
            <div class="layui-input-block">
                <input type="password" id="pwd" name="pwd" placeholder="请输入密码" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="red">*</span> 确认密码</label>
            <div class="layui-input-block">
                <input type="password" id="repwd" name="repwd" placeholder="请输入确认密码" class="layui-input">
            </div>
        </div>

        <eq name="style" value="mobile">
            <div class="layui-form-item">
                <label class="layui-form-label"><span class="red">*</span> 手机号</label>
                <div class="layui-input-block">
                    <input type="text" id="mobile" name="mobile" placeholder="请输入手机号" lay-verify="require|phone"
                           class="layui-input mobile">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"><span class="red">*</span> 验证码</label>
                <div class="layui-input-block">
                    <input type="text" name="captcha" placeholder="{:__('验证码')}" class="layui-input captcha">
                    <div class="captcha fr">
                        <button id="captcha" type="button" class="layui-btn layui-btn-normal"
                                lay-ajax data-url="/api.php/ajax/smsSend" data-object="mobile:mobile,event:event"
                        >获取验证码
                        </button>
                    </div>
                </div>
            </div>
            <else/>
            <div class="layui-form-item">
                <label class="layui-form-label"><span class="red">*</span> 邮箱地址</label>
                <div class="layui-input-block">
                    <input type="text" name="email" lay-verify="require|email" placeholder="请输入邮箱" class="layui-input">
                </div>
            </div>
        </eq>

        <input type="text" hidden name="event" class="event" value="register">
        <div class="layui-footer layui-form-item layui-center">
            <button class="layui-btn layui-btn-primary" type="button" sa-event="closeDialog">{:__('取消')}</button>
            <button class="layui-btn layui-btn-normal" lay-filter="submitIframe" data-reload="top" lay-submit>
                {:__('立即注册')}
            </button>
        </div>

    </form>
</div>
</body>
</html>